/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package UI;

import BO.Controller;

/**
 *
 * @author Ymmot
 */
public class DisplayMessageBean {

    private int id;
    private String fromUser;
    private String toUser;           
    private String title;
    private String date;
    private String content;
    private Controller controller;
    
    public DisplayMessageBean() {
        controller = new Controller();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
        PrivatemessageView pm = controller.getprivateMessageById(id);
        fromUser = pm.getFromUser();
        toUser = pm.getToUser();           
        title = pm.getTitle();
        date = pm.getDate();
        content = pm.getContent();
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getFromUser() {
        return fromUser;
    }

    public void setFromUser(String fromUser) {
        this.fromUser = fromUser;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getToUser() {
        return toUser;
    }

    public void setToUser(String toUser) {
        this.toUser = toUser;
    }
  
    
}
